package cn.gdsdxy.service.impl;
import cn.gdsdxy.dao.StudentDao;
import cn.gdsdxy.pojo.Student;
import cn.gdsdxy.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentDao studentDao;
    public List<Student> getAllStudent(){
        return studentDao.getAllStudent();
    }
    public int addStudent(Student student){
        return studentDao.addStudent(student);
    }
    public int deleteStudent(int number){
        return studentDao.deleteStudent(number);
    }
    public int updataStudent(Student student){
        return studentDao.updataStudent(student);
    }
    public List<Student> getStudentByNumberAndName(int number,String name){
        return studentDao.getStudentByNumberAndName(number,name);
    }
    public List<Student> getAStudent(){
        return studentDao.getAStudent();
    }
}
